//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.liy.framework.common.office;

import java.io.IOException;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PdfUtil {
    protected static Logger log = LoggerFactory.getLogger(PdfUtil.class);

    public PdfUtil() {
    }

    public static void mergePDF(String destFilePath, String[] fileListPath) throws IOException {
        log.info("开始合并PDF文件：" + destFilePath);
        long start = System.currentTimeMillis();
        PDFMergerUtility mergePdf = new PDFMergerUtility();
        String[] var5 = fileListPath;
        int var6 = fileListPath.length;

        for(int var7 = 0; var7 < var6; ++var7) {
            String path = var5[var7];
            mergePdf.addSource(path);
        }

        mergePdf.setDestinationFileName(destFilePath);
        mergePdf.mergeDocuments();
        long end = System.currentTimeMillis();
        log.info("开始合并PDF文件完成，用时：" + (end - start) + "ms");
    }
}
